<template>
	<view class="content-view">
		<!-- <view class="title">{{detailInfo.studioName}}</view> -->
		<view class="base-wrap">
			<view class="base-info">
				<!-- <up-image :src="detailInfo.surfacePlot" width="180rpx" height="120rpx"></up-image> -->
				<up-avatar :src="detailInfo.surfacePlot" shape="circle" size="70px"></up-avatar>
				<view class="base-right">
					<view>{{detailInfo.studioName}}</view>
					<view>{{detailInfo.createTime}}</view>
				</view>
			</view>
		</view>
		<view class="studio-data-wrap">
			<view class="title1">基本信息</view>
			<view class="studio-data">
				<view class="item">
					<text class="item-name">类型</text>
					<u-tag :text="detailInfo.studioTypeStr"  size="mini" type="warning"></u-tag>
				</view>
				<view class="item">
					<text class="item-name">级别</text>
					<u-tag :text="detailInfo.listingLevelStr"  size="mini" type="success"></u-tag>
				</view>
				<view class="item">
					<text class="item-name">领衔人</text>
					<text class="item-data">{{detailInfo.leader}}</text>
				</view>
				<view class="item">
					<text class="item-name">成员总数</text>
					<text class="item-data">{{detailInfo.memberTotal}}</text>
				</view>
				<view class="item">
					<text class="item-name">骨干成员数量</text>
					<text class="item-data">{{detailInfo.coreMemberTotal}}</text>
				</view>
			</view>
		</view>
		<view class="achievement-wrap">
			<view class="title">成果展示</view>
			<view class="achievement-image">
				<up-image :src="item"  v-for="(item,index) in detailInfo.achievementList" width="200rpx" height="120rpx" style="width: calc(33.3% - 20rpx);margin: 10rpx;"></up-image>
			</view>
		</view>
		<view class="studio-content">
			<view class="title">业绩简介</view>
			<view class="intro"><up-parse :content="detailInfo.studioIntroduce"></up-parse></view>
		</view>
		
	</view>
</template>

<script>
	import {innovationStudioApi} from '@/api/innovation/innovation-studio-api.js';
	export default {
		data() {
			return {
				
				detailInfo:{},
			}
		},
		onLoad(option) {
			const id = option.id;
			this.getDetail(id);
		},
		methods:{
			async getDetail(id){
				const result = await innovationStudioApi.getDetail(id);
				this.detailInfo = result.data;
				if(this.detailInfo.achievement){
					this.detailInfo.achievementList = this.detailInfo.achievement.split(',');
				}
			}
		}
	}
</script>

<style lang="scss" scoped>
	.content-view{
		background-color: #f5f5f5;
		padding: 0;
		padding-bottom: 20rpx;
	}
	.title{
		// font-weight: 700;
		// color: #333333;
		// font-size: 18px;
		// border-bottom: 1px solid #f5f5f5;
		// width: 100%;
		// padding-bottom: 20rpx;
		font-weight: 700;
		color: #333333;
		font-size: 18px;
		border-bottom: 1px solid #f5f5f5;
		width: 100%;
		padding-bottom: 20rpx;
		background-color: #f5f5f5;
	}
	.base-wrap{
		padding: 40rpx;
		// background-color: #fff;
		.base-title{
			font-weight: 700;
			color: #333333;
			font-size: 18px;
			border-bottom: 1px solid #f5f5f5;
			width: 100%;
			padding-bottom: 20rpx;
		}
		.base-info{
			display: flex;
			.base-right{
				margin-left: 20rpx;
				font-size: 28rpx;
				display: flex;
				flex-direction: column;
				justify-content: center;
				view{
					padding: 10rpx;
				}
			}
		}
	}
	.studio-data-wrap{
		background-color: #fff;
		// padding: 20rpx 0;
		margin: 20rpx 40rpx;
		border-radius: 20rpx;
		
		.title1{
			font-weight: 700;
			color: #333333;
			font-size: 18px;
			border-bottom: 1px solid #f5f5f5;
			width: 100%;
			padding-bottom: 20rpx;
			background-color: #f5f5f5;
			// padding: 0 20rpx;
		}
		.studio-data{
			background-color: #fff;
			border-radius: 20rpx;
			margin: 0 10rpx;
			padding: 10rpx 10rpx;
			.item{
				display: flex;
				// justify-content: space-between;
				padding: 10rpx;
				margin: 20rpx 0;
				// border: 1px solid red;
				.item-name{
					width: 40%;
				}
				.item-data{
					
				}
			}
		}
	}
	
	.achievement-wrap{
		background-color: #fff;
		// padding: 20rpx 40rpx;
		// margin-top: 20rpx;
		margin: 20rpx 40rpx;
		border-radius: 20rpx;
		.achievement-image{
			border-top-left-radius: 20rpx;
			border-top-right-radius: 20rpx;
			display: flex;
			flex-wrap: wrap;
			padding: 20rpx;
		}
	}
	.bottom-info {
		display: flex;
		justify-content: space-between;
		align-items: center;
		font-size: 26rpx;
		color: $uni-text-color-grey;
		padding: 30rpx 0;
		.org, .count {
			display: flex;
			align-items: center;
		}
		
		:deep(.u-iconfont) {
			color: $uni-text-color-grey !important;
		}
	}
	.studio-content {
		background-color: #fff;
		margin: 20rpx 40rpx;
		font-size: 13px;
		color: #333333;
		line-height: 25px;
		.intro{
			padding: 20rpx 30rpx;
			border-radius: 20rpx;
		}
	}
</style>